package Picture;

public class Circular extends Graphics {
    String name;
    double radius;
    double pi;
    public Circular(String name,double radius,double pi){
        super(name);
        this.radius=radius;
        this.pi=pi;
    }
    public void Circumference(){
//        pi=3.14;
        double c=2*pi*radius;
        System.out.println("圆形周长是："+c);
    }
    public void range(){
//        pi=3.14;
        double c=pi*Math.pow(radius,2);
        System.out.println("圆形面积是："+c);
    }


    public void setRadius(double radius) {
        this.radius = radius;
    }

    public void setPi(double pi) {
        this.pi = pi;
    }

    public double getPi() {
        return pi;
    }

    public double getRadius() {
        return radius;
    }
}
